<?xml version="1.0" encoding="UTF-8"?>


<persistence xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
             version="1.0">
             
    <!-- Tomcat + Hypersonic -->
<!--     <persistence-unit name="default">
    	<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
    	<non-jta-data-source>java://comp/env/jdbc/TinpuConsolaDS</non-jta-data-source>
    	<class>org.openxava.session.GalleryImage</class>
    	<class>org.openxava.web.editors.DiscussionComment</class>
        <properties>
            <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
            <property name="hibernate.hbm2ddl.auto" value="update"/>
            <property name="hibernate.connection.release_mode" value="after_transaction"/>
        </properties>
    </persistence-unit>   -->  
    
        <persistence-unit name="default">	
     <provider>org.hibernate.ejb.HibernatePersistence</provider>
     <non-jta-data-source>java:comp/env/jdbc/TinpuConsolaDS</non-jta-data-source>
     <class>org.openxava.session.GalleryImage</class>
        <properties>
            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
        </properties>
    </persistence-unit>
    
    <!-- JBoss + Hypersonic 
    <persistence-unit name="default">
    	<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
    	<non-jta-data-source>java:/TinpuConsolaDS</non-jta-data-source>
    	<class>org.openxava.session.GalleryImage</class>
        <properties>
            <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
            <property name="hibernate.hbm2ddl.auto" value="update"/>
            <property name="hibernate.connection.release_mode" value="after_transaction"/>
        </properties>
    </persistence-unit>    
    -->
    
    <!-- WebSphere + AS/400 
    <persistence-unit name="default">
    	<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
    	<non-jta-data-source>jdbc/TinpuConsolaDS</non-jta-data-source>
    	<class>org.openxava.session.GalleryImage</class>
        <properties>
            <property name="hibernate.dialect" value="org.hibernate.dialect.DB2400Dialect"/>
            <property name="hibernate.hbm2ddl.auto" value="update"/>
            <property name="hibernate.connection.release_mode" value="after_transaction"/>
        </properties>
    </persistence-unit>
    -->
    
    <!-- JUnit Hypersonic -->
    <persistence-unit name="junit">
    	<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
    	<class>org.openxava.web.editors.DiscussionComment</class>
        <properties>
			<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
			<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
			<property name="hibernate.connection.release_mode" value="after_transaction"/>
			<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/tinpu"/>
			 <property name="hibernate.connection.username" value="admin"/>
            <property name="hibernate.connection.password" value="admin"/> 
        </properties>
    </persistence-unit>    
        
</persistence>
